const state = {
  status: "",
  top: "",
  left: "",
  list: [],
};

const getters = {
  status: (state: any) => state.status,
  top: (state: any) => state.top,
  left: (state: any) => state.left,
  list: (state: any) => state.list,
};

const mutations = {
  setState(state: any, menu: any) {
    state.status = menu.status;
    state.top = menu.top;
    state.left = menu.left;
    state.list = menu.list;
  },
  setStatus(state: any, status: string) {
    state.status = status;
  },
};

const actions = {
  setStatus(context: any, status: string) {
    context.commit("setStatus", status);
  },
};

export default { state, getters, mutations, actions };
